<?php if (!empty($tips_categories)) {?>

<div id="tips_categories">
	<?php
		$i = 0; $j = 0;
		$offset = 0;
		foreach ($tips_categories as $tip_category) {
			$i ++;
			if ($sub_category_id == $tip_category['id'] && $i > 10) {
				$offset = ($i - 10) * 75 * (-1);
				$j = $i;
			}
		}
	?>
	<a class="pre <?php echo ($j == 0) ? 'hide' : '';?>" href="javascript:void(0)">&nbsp;</a>
	<a class="pre_copy disabled <?php echo ($j != 0) ? 'hide' : '';?>" href="javascript:void(0)">&nbsp;</a>
	<div class="content" style="#overflow-y:visible !important;">
		<ul style="left:<?php echo $offset . 'px'?>">
			<?php foreach ($tips_categories as $tip_category) {?>
			<li class="<?php echo ($sub_category_id == $tip_category['id'] ? "current" : '');?>">
				<a href="<?php echo site_url($nav . "/lists/" . $tip_category['id']);?>"><?php echo $tip_category['name'];?></a>
				<div class="arrow_up hide">
					<em>◆</em>
					<span>◆</span>
				</div>
			</li>
		 	<?php } ?>
			<div class="clear"></div>
		</ul>
	</div>
	<a class="next <?php echo (count($tips_categories) > 10 && count($tips_categories) != $j) ? '' : 'hide'?>" href="javascript:void(0)">&nbsp;</a>
	<a class="next_copy disabled <?php echo (count($tips_categories) > 10 && count($tips_categories) != $j) ? 'hide' : ''?>" href="javascript:void(0)">&nbsp;</a>
	<div class="clear"></div>
</div>

<?php }?>
<script src="../../../js/jquery.scroller2.js"></script>
<script>
$('#tips_categories').scroller2(10, <?php echo ($j - 10) > 0 ? ($j - 10) : 0;?>, <?php echo $offset; ?>);
</script>